package com.zkthink.ceres.common.enums;

import com.zkthink.exception.BizException;
import lombok.Getter;

/**
 * @ClassName LawyerTypeEnum
 * @Description: LawyerTypeEnum
 * @Author ck
 * @Date 2021/12/10
 * @Version V1.0
 **/
@Getter
public enum LawyerTypeEnum {
    NOT_LAWYER(0, "不是律师"),
    YES_LAWYER(1, "是律师");

    private int code;

    private String desc;

    LawyerTypeEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static LawyerTypeEnum getDscByType(Integer type) {
        for (LawyerTypeEnum p : values()) {
            if (p.getCode() == type.intValue()) {
                return p;
            }
        }
        throw new BizException("no support promotionPlan");
    }
}
